<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="js/vue.js"></script>
  <script src="js/mycounter.js"></script>
</head>
<body>
  <div id="app">
    <ul>
      <li><my-counter></my-counter></li>
      <li><my-counter></my-counter></li>
      <li><my-counter></my-counter></li>
    </ul>
  </div>
  <script src="js/vue.js"></script>
  <script src="js/mycounter.js"></script>
  <script>
    //做一个组件和做new Vue()完全一样
    //只不过3步变2步而已，不用new Vue()了！
    Vue.component("my-counter",myCounter)
    new Vue({
      el:"#app"
    })
  </script>
</body>
</html>
